home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 February: Tool Chest / Dev.CD Feb 95 / Dev.CD Feb 95.toast / Tool Chest / Interfaces / Universal Interfaces 2.0a3 / Universal AIncludes / OSAGeneric.a < prev    next >
Encoding:
Text File  |  1994-11-11  |  3.5 KB  |  151 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        OSAGeneric.a
  3. ;
  4. ;    Copyright:    © 1984-1994 by Apple Computer, Inc.
  5. ;                All rights reserved.
  6. ;
  7. ;    Version:    Universal Interfaces 2.0a3  ETO #16, MPW prerelease.  Friday, November 11, 1994. 
  8. ;
  9. ;    Bugs?:        If you find a problem with this file, send the file and version
  10. ;                information (from above) and the problem description to:
  11. ;
  12. ;                    Internet:    apple.bugs@applelink.apple.com
  13. ;                    AppleLink:    APPLE.BUGS
  14. ;
  15. ;
  16.  
  17.     IF &TYPE('__OSAGENERIC__') = 'UNDEFINED' THEN
  18. __OSAGENERIC__ SET 1
  19.  
  20.  
  21.     IF &TYPE('__ERRORS__') = 'UNDEFINED' THEN
  22.     include 'Errors.a'
  23.     ENDIF
  24. ;        include 'ConditionalMacros.a'                                ;
  25.  
  26.     IF &TYPE('__APPLEEVENTS__') = 'UNDEFINED' THEN
  27.     include 'AppleEvents.a'
  28.     ENDIF
  29. ;        include 'Types.a'                                            ;
  30. ;        include 'Memory.a'                                            ;
  31. ;            include 'MixedMode.a'                                    ;
  32. ;        include 'OSUtils.a'                                        ;
  33. ;        include 'Events.a'                                            ;
  34. ;            include 'Quickdraw.a'                                    ;
  35. ;                include 'QuickdrawText.a'                            ;
  36. ;        include 'EPPC.a'                                            ;
  37. ;            include 'PPCToolbox.a'                                    ;
  38. ;                include 'AppleTalk.a'                                ;
  39. ;            include 'Processes.a'                                    ;
  40. ;                include 'Files.a'                                    ;
  41. ;        include 'Notification.a'                                    ;
  42.  
  43.     IF &TYPE('__OSA__') = 'UNDEFINED' THEN
  44.     include 'OSA.a'
  45.     ENDIF
  46. ;        include 'AEObjects.a'                                        ;
  47. ;        include 'Components.a'                                        ;
  48. ;     NOTE:    This interface defines a "generic scripting component."
  49. ;            The Generic Scripting Component allows automatic dispatch to a
  50. ;            specific scripting component that conforms to the OSA interface.
  51. ;            This component supports OSA, by calling AppleScript or some other 
  52. ;            scripting component.  Additionally it provides access to the default
  53. ;            and the user-prefered scripting component.
  54. ;
  55.  
  56. ; Component version this header file describes 
  57. kGenericComponentVersion        EQU        $0100
  58.  
  59. kGSSSelectGetDefaultScriptingComponent EQU        $1001
  60. kGSSSelectSetDefaultScriptingComponent EQU        $1002
  61. kGSSSelectGetScriptingComponent    EQU        $1003
  62. kGSSSelectGetScriptingComponentFromStored EQU        $1004
  63. kGSSSelectGenericToRealID        EQU        $1005
  64. kGSSSelectRealToGenericID        EQU        $1006
  65. kGSSSelectOutOfRange            EQU        $1007
  66.  
  67. ; get and set the default scripting component 
  68.     IF GENERATING68K THEN
  69.         Macro
  70.         _OSAGetDefaultScriptingComponent
  71.             dc.w     $2F3C
  72.             dc.w     $0000
  73.             dc.w     $1001
  74.             moveq    #0,d0
  75.             dc.w     $A82A
  76.         EndM
  77.     ELSE
  78.         IMPORT    OSAGetDefaultScriptingComponent
  79.     ENDIF
  80.  
  81.     IF GENERATING68K THEN
  82.         Macro
  83.         _OSASetDefaultScriptingComponent
  84.             dc.w     $2F3C
  85.             dc.w     $0000
  86.             dc.w     $1002
  87.             moveq    #0,d0
  88.             dc.w     $A82A
  89.         EndM
  90.     ELSE
  91.         IMPORT    OSASetDefaultScriptingComponent
  92.     ENDIF
  93.  
  94. ; get a scripting component instance from its subtype code 
  95.     IF GENERATING68K THEN
  96.         Macro
  97.         _OSAGetScriptingComponent
  98.             dc.w     $2F3C
  99.             dc.w     $0000
  100.             dc.w     $1003
  101.             moveq    #0,d0
  102.             dc.w     $A82A
  103.         EndM
  104.     ELSE
  105.         IMPORT    OSAGetScriptingComponent
  106.     ENDIF
  107.  
  108. ; get a scripting component selector (subType) from a stored script 
  109.     IF GENERATING68K THEN
  110.         Macro
  111.         _OSAGetScriptingComponentFromStored
  112.             dc.w     $2F3C
  113.             dc.w     $0000
  114.             dc.w     $1004
  115.             moveq    #0,d0
  116.             dc.w     $A82A
  117.         EndM
  118.     ELSE
  119.         IMPORT    OSAGetScriptingComponentFromStored
  120.     ENDIF
  121.  
  122. ; get a real component instance and script id from a generic id 
  123.     IF GENERATING68K THEN
  124.         Macro
  125.         _OSAGenericToRealID
  126.             dc.w     $2F3C
  127.             dc.w     $0000
  128.             dc.w     $1005
  129.             moveq    #0,d0
  130.             dc.w     $A82A
  131.         EndM
  132.     ELSE
  133.         IMPORT    OSAGenericToRealID
  134.     ENDIF
  135.  
  136. ; get a generic id from a real component instance and script id 
  137.     IF GENERATING68K THEN
  138.         Macro
  139.         _OSARealToGenericID
  140.             dc.w     $2F3C
  141.             dc.w     $0000
  142.             dc.w     $1006
  143.             moveq    #0,d0
  144.             dc.w     $A82A
  145.         EndM
  146.     ELSE
  147.         IMPORT    OSARealToGenericID
  148.     ENDIF
  149.  
  150.     ENDIF ; __OSAGENERIC__
  151.